BTHAB-206: Add send invoice by email in bulk action menu for bulk invoice sending #978
+77
−12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds
Send invoice by email
in the bulk action menu for bulk invoice sendingBefore
The
Send Invoice by email
action doesn't exist in the bulk action in the contribution search kit viewAfter
The
Send Invoice by email
action exists in the bulk action in the contribution search kit viewWith the
invoice-helper
extension installed, theTemplate field
is displayedTechnical Details
This functionality uses the CiviCRM
CRM_Contribute_Form_Task_Invoice
class to send the email, to avoid having to duplicate the code, this also allows us to keep other customizations provided by third-party extensions likeinvoice-helper
to the bulk contribution email screen.The caveat is that
CRM_Contribute_Form_Task_Invoice
class is meant to redirect to a contribution view after sending the email as hardcoded from the code. We introduced custom logic to override this redirect hereuk.co.compucorp.civicase/civicase.php
Lines 305 to 307 in b780a58